﻿using OS.Common.Enums;

namespace OS.Common.Core
{
    /// <summary>
    /// 带Id的自定义响应结果
    /// </summary>
    public class CustomResultId : CustomResult
    {
        /// <summary>
        /// 返回的关键值，如返回添加是否成功并返回Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public CustomResultId() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="id">实体对象Id</param>
        public CustomResultId(long id)
        {
            Id = id;
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="code">响应结果代码</param>
        /// <param name="message">消息</param>
        public CustomResultId(int code, string message = "")
            :base(code, message) { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="resultType">响应结果类型</param>
        /// <param name="message">消息</param>
        public CustomResultId(ResultType resultType, string message = "") 
            :base(resultType, message) { }
    }
}